/**
 * Flight.java
 * FlightBookingCentre
 * Phillip
 * 2014��3��22�� ����2:02:24
 */
package com.dao;

import java.io.Serializable;
import java.sql.Time;

/**
 * @author Phillip
 */
public class Flight implements Serializable{

    private String fligthNOString;
    private String airlineString;
    private String deptCityString;
    private String destCityString;
    private String deptAirportString;
    private String arriAirportString;
//    private Date deptDate;
//    private Date arriDate;
    private Time deptTime;
    private Time arriTime;
    private String planeString;
    private SeatClass classEnum;
    private String priceString;
//    private String vacancyString;

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub

    }

    /**
     * @return the fligthNOString
     */
    public String getFligthNOString() {
        return fligthNOString;
    }

    /**
     * @param fligthNOString the fligthNOString to set
     */
    public void setFligthNOString(String fligthNOString) {
        this.fligthNOString = fligthNOString;
    }

    /**
     * @return the airlineString
     */
    public String getAirlineString() {
        return airlineString;
    }

    /**
     * @param airlineString the airlineString to set
     */
    public void setAirlineString(String airlineString) {
        this.airlineString = airlineString;
    }

    /**
     * @return the deptCityString
     */
    public String getDeptCityString() {
        return deptCityString;
    }

    /**
     * @param deptCityString the deptCityString to set
     */
    public void setDeptCityString(String deptCityString) {
        this.deptCityString = deptCityString;
    }

    /**
     * @return the destCityString
     */
    public String getDestCityString() {
        return destCityString;
    }

    /**
     * @param destCityString the destCityString to set
     */
    public void setDestCityString(String destCityString) {
        this.destCityString = destCityString;
    }

    /**
     * @return the deptAirportString
     */
    public String getDeptAirportString() {
        return deptAirportString;
    }

    /**
     * @param deptAirportString the deptAirportString to set
     */
    public void setDeptAirportString(String deptAirportString) {
        this.deptAirportString = deptAirportString;
    }

    /**
     * @return the arriAirportString
     */
    public String getArriAirportString() {
        return arriAirportString;
    }

    /**
     * @param arriAirportString the arriAirportString to set
     */
    public void setArriAirportString(String arriAirportString) {
        this.arriAirportString = arriAirportString;
    }

//    /**
//     * @return the deptDate
//     */
//    public Date getDeptDate() {
//        return deptDate;
//    }
//
//    /**
//     * @param deptDate the deptDate to set
//     */
//    public void setDeptDate(Date deptDate) {
//        this.deptDate = deptDate;
//    }
//
//    /**
//     * @return the arriDate
//     */
//    public Date getArriDate() {
//        return arriDate;
//    }
//
//    /**
//     * @param arriDate the arriDate to set
//     */
//    public void setArriDate(Date arriDate) {
//        this.arriDate = arriDate;
//    }

    /**
     * @return the deptTime
     */
    public Time getDeptTime() {
        return deptTime;
    }

    /**
     * @param deptTime the deptTime to set
     */
    public void setDeptTime(Time deptTime) {
        this.deptTime = deptTime;
    }

    /**
     * @return the arriTime
     */
    public Time getArriTime() {
        return arriTime;
    }

    /**
     * @param arriTime the arriTime to set
     */
    public void setArriTime(Time arriTime) {
        this.arriTime = arriTime;
    }

    /**
     * @return the planeString
     */
    public String getPlaneString() {
        return planeString;
    }

    /**
     * @param planeString the planeString to set
     */
    public void setPlaneString(String planeString) {
        this.planeString = planeString;
    }

    /**
     * @return the classEnum
     */
    public SeatClass getClassEnum() {
        return classEnum;
    }

    /**
     * @param classString the classEnum to set
     */
    public void setClassEnum(String classString) {
        switch (classString) {
            case "FIR":
                this.classEnum = classEnum.FIR;
                break;
            case "BUS":
                this.classEnum = classEnum.BUS;
                break;
            case "ECO":
                this.classEnum = classEnum.ECO;
            default:
                break;
        }
    }

    /**
     * @return the priceString
     */
    public String getPriceString() {
        return priceString;
    }

    /**
     * @param priceString the priceString to set
     */
    public void setPriceString(String priceString) {
        this.priceString = priceString;
    }

//    /**
//     * @return the vacancyString
//     */
//    public String getVacancyString() {
//        return vacancyString;
//    }
//
//    /**
//     * @param vacancyString the vacancyString to set
//     */
//    public void setVacancyString(String vacancyString) {
//        this.vacancyString = vacancyString;
//    }

    public corba.airlineServer.Flight transfer() {
        return new corba.airlineServer.Flight(fligthNOString, airlineString, deptCityString, destCityString,
                deptAirportString, arriAirportString, deptTime.toString(),
                arriTime.toString(), planeString, classEnum.toString(), priceString);
    }

}
